import request from '@/utils/request'

const api_name = "/admin/vod/teacher";
export default {
    pageList(current, limit, searchObj) {
        return request({
            url: `${api_name}/pageList/${current}/${limit}`,
            method: "post",
            data: searchObj
        })
    },
    // 查询所有讲师
    list() {
        return request({
            url: `${api_name}/findAll`,
            method: "get",
        })
    },
    // 根据id逻辑删除讲师
    deleteVodById(id) {
        return request({
            url: `${api_name}/remove/${id}`,
            method: "delete",
        })
    },
    // 添加讲师
    saveTeacher(params) {
        return request({
            url: `${api_name}/save`,
            method: "post",
            data: params
        })
    },
    // 查询讲师
    getById(id) {
        return request({
            url: `${api_name}/get/${id}`,
            method: `get`
        })
    },
    // 修改讲师
    updateById(teacher) {
        return request({
            url: `${api_name}/update`,
            method: `put`,
            data: teacher
        })
    },
    // 批量删除讲师
    batchRemove(idList) {
        return request({
            url: `${api_name}/batchRemove`,
            method: `delete`,
            data: idList
        })
    },
}